import request from '@/utils/request'

// 查询列表
export function listSales(query) {
  return request({
    url: '/sales/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getSales(id) {
  return request({
    url: '/sales/getInfo/' + id,
    method: 'get'
  })
}

// 新增
export function addSales(data) {
  return request({
    url: '/sales',
    method: 'post',
    data: data
  })
}

// 修改
export function updateSales(data) {
  return request({
    url: '/sales',
    method: 'put',
    data: data
  })
}


export function spUpdate(data) {
  return request({
    url: '/sales/spUpdate',
    method: 'POST',
    data: data
  })
}

// 删除
export function delSales(id) {
  return request({
    url: '/sales/' + id,
    method: 'delete'
  })
}

// 完成交易
export function complete(data) {
  return request({
    url: '/sales/complete',
    method: 'post',
    data
  })
}

//转问题
export function transferToIssue(data) {
  return request({
    url: '/sales/transferToIssue',
    method: 'post',
    data
  })
}

//获取链接
export function getUrlApi(data) {
  return request({
    url: '/system/url/getUrl',
    method: 'get',
    params: data
  })
}

